package com.example.myfirstapp;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.util.AttributeSet;
import android.view.View;

public class GameView extends View {
    private Bitmap bmp;

    public GameView(Context context, AttributeSet set, int style)
    {
    	super(context, set, style);
    	bmp = BitmapFactory.decodeResource(getResources(), R.drawable.baldoza);
    }
    
    public GameView(Context context) {
          super(context);
          bmp = BitmapFactory.decodeResource(getResources(), R.drawable.baldoza);
    }
    @Override
    protected void onDraw(Canvas canvas) {
        canvas.drawColor(Color.BLACK);
        float dCorrector = getResources().getDisplayMetrics().density;
        for (int col=0; col<5;col++){
        	for (int row=0; row<5;row++){
        		canvas.drawBitmap(bmp, col*99*dCorrector, row*99*dCorrector, null);
        	}
        }
    }
}
